<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TDraggable类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_t_draggable-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TDraggable类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<div class="dynheader">
类 TDraggable 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_t_draggable.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:afdc27300b29ffa6ad77801a4d749ca14"><td class="memItemLeft" align="right" valign="top"><a id="afdc27300b29ffa6ad77801a4d749ca14"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TDraggable</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:afdc27300b29ffa6ad77801a4d749ca14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8cc5498243c1cc67c1b2cecff65ca93"><td class="memItemLeft" align="right" valign="top"><a id="ab8cc5498243c1cc67c1b2cecff65ca93"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TDraggable</b> (const draggable_t *nativeObj)</td></tr>
<tr class="separator:ab8cc5498243c1cc67c1b2cecff65ca93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4eb3acb66e132861a55ce97dc8cd9167"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#a4eb3acb66e132861a55ce97dc8cd9167">SetTop</a> (int32_t top)</td></tr>
<tr class="separator:a4eb3acb66e132861a55ce97dc8cd9167"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea839570d8aa35928e3d21ee10f9432b"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#aea839570d8aa35928e3d21ee10f9432b">SetBottom</a> (int32_t bottom)</td></tr>
<tr class="separator:aea839570d8aa35928e3d21ee10f9432b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89091401784ec29b1dd9c9483d4afa0b"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#a89091401784ec29b1dd9c9483d4afa0b">SetLeft</a> (int32_t left)</td></tr>
<tr class="separator:a89091401784ec29b1dd9c9483d4afa0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2801c5c32eda58ed7d6ec0742df5f51c"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#a2801c5c32eda58ed7d6ec0742df5f51c">SetRight</a> (int32_t right)</td></tr>
<tr class="separator:a2801c5c32eda58ed7d6ec0742df5f51c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa102cfcddc3fd7293ab0686cd66f7f08"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#aa102cfcddc3fd7293ab0686cd66f7f08">SetVerticalOnly</a> (bool vertical_only)</td></tr>
<tr class="separator:aa102cfcddc3fd7293ab0686cd66f7f08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e2919804a3499fc60ac2c1481afbb2d"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#a9e2919804a3499fc60ac2c1481afbb2d">SetHorizontalOnly</a> (bool horizontal_only)</td></tr>
<tr class="separator:a9e2919804a3499fc60ac2c1481afbb2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab305e1cf8174ca91d36d25d4ab9840e1"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#ab305e1cf8174ca91d36d25d4ab9840e1">SetDragWindow</a> (bool drag_window)</td></tr>
<tr class="separator:ab305e1cf8174ca91d36d25d4ab9840e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3687c79a0617ac922f873da75edf2900"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#a3687c79a0617ac922f873da75edf2900">GetTop</a> () const</td></tr>
<tr class="separator:a3687c79a0617ac922f873da75edf2900"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bcc06371aa889e9e4a409feacc6f65c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#a0bcc06371aa889e9e4a409feacc6f65c">GetBottom</a> () const</td></tr>
<tr class="separator:a0bcc06371aa889e9e4a409feacc6f65c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a701e700744d886af06f76643ef86fa94"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#a701e700744d886af06f76643ef86fa94">GetLeft</a> () const</td></tr>
<tr class="separator:a701e700744d886af06f76643ef86fa94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2cb572cb5e104111293a5b8c6262f14b"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#a2cb572cb5e104111293a5b8c6262f14b">GetRight</a> () const</td></tr>
<tr class="separator:a2cb572cb5e104111293a5b8c6262f14b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9fa35f827f0581f520cc67108f3644a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#ac9fa35f827f0581f520cc67108f3644a">GetVerticalOnly</a> () const</td></tr>
<tr class="separator:ac9fa35f827f0581f520cc67108f3644a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77cac43dad697d7498672128f2e5cf7f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#a77cac43dad697d7498672128f2e5cf7f">GetHorizontalOnly</a> () const</td></tr>
<tr class="separator:a77cac43dad697d7498672128f2e5cf7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9d9a0fb1ee8b25c07497c5363371687"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#ad9d9a0fb1ee8b25c07497c5363371687">GetDragWindow</a> () const</td></tr>
<tr class="separator:ad9d9a0fb1ee8b25c07497c5363371687"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a7f56df83ea4fd5083d5bccd0ffd80586"><td class="memItemLeft" align="right" valign="top"><a id="a7f56df83ea4fd5083d5bccd0ffd80586"></a>
static <a class="el" href="class_t_draggable.html">TDraggable</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a7f56df83ea4fd5083d5bccd0ffd80586"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9e6e6b9121070e22a61c4e972bde0f1"><td class="memItemLeft" align="right" valign="top"><a id="ad9e6e6b9121070e22a61c4e972bde0f1"></a>
static <a class="el" href="class_t_draggable.html">TDraggable</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const widget_t *nativeObj)</td></tr>
<tr class="separator:ad9e6e6b9121070e22a61c4e972bde0f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3850d2d657e8e6c2f77d1bfe11dddc77"><td class="memItemLeft" align="right" valign="top"><a id="a3850d2d657e8e6c2f77d1bfe11dddc77"></a>
static <a class="el" href="class_t_draggable.html">TDraggable</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (TWidget &amp;obj)</td></tr>
<tr class="separator:a3850d2d657e8e6c2f77d1bfe11dddc77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0399ffd70215e30b48e39408fd1d94b3"><td class="memItemLeft" align="right" valign="top"><a id="a0399ffd70215e30b48e39408fd1d94b3"></a>
static <a class="el" href="class_t_draggable.html">TDraggable</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const TWidget &amp;obj)</td></tr>
<tr class="separator:a0399ffd70215e30b48e39408fd1d94b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98f4714bcd9132462967c3e552c8b1e6"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_draggable.html#a98f4714bcd9132462967c3e552c8b1e6">Create</a> (TWidget &amp;parent, xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:a98f4714bcd9132462967c3e552c8b1e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>将draggable放入目标控件，即可让目标控件或当前窗口可以被拖动。</p>
<p>draggable_t是widget\_t的子类控件，widget_t的函数均适用于draggable_t控件。</p>
<p>在xml中使用"draggable"标签创建draggable控件。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">button</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Drag Me&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;80&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;40&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;10&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;10&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">draggable</span> /&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">button</span>&gt;</div>
</div><!-- fragment --><p>拖动对话框标题时移动对话框：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">dialog_title</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Hello AWTK&quot;</span></div>
<div class="line">*&lt;<span class="keywordtype">draggable</span> <span class="keyword">drag_window</span>=<span class="stringliteral">&quot;true&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">dialog_title</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考： </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/draggable.xml">draggable.xml</a></p>
<p>在c代码中使用函数draggable_create创建按钮控件。如：</p>
<blockquote class="doxtable">
<p>draggable本身不可见，故无需style。 </p>
</blockquote>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a98f4714bcd9132462967c3e552c8b1e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98f4714bcd9132462967c3e552c8b1e6">&#9670;&nbsp;</a></span>Create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget TDraggable::Create </td>
          <td>(</td>
          <td class="paramtype">TWidget &amp;&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建draggable对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="a0bcc06371aa889e9e4a409feacc6f65c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0bcc06371aa889e9e4a409feacc6f65c">&#9670;&nbsp;</a></span>GetBottom()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t TDraggable::GetBottom </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>拖动范围的底部限制。缺省为父控件的底部。 </p>

</div>
</div>
<a id="ad9d9a0fb1ee8b25c07497c5363371687"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9d9a0fb1ee8b25c07497c5363371687">&#9670;&nbsp;</a></span>GetDragWindow()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TDraggable::GetDragWindow </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>拖动窗口而不是父控件。比如放在对话框的titlebar上，拖动titlebar其实是希望拖动对话框。 </p>

</div>
</div>
<a id="a77cac43dad697d7498672128f2e5cf7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77cac43dad697d7498672128f2e5cf7f">&#9670;&nbsp;</a></span>GetHorizontalOnly()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TDraggable::GetHorizontalOnly </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>只允许水平拖动。 </p>

</div>
</div>
<a id="a701e700744d886af06f76643ef86fa94"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a701e700744d886af06f76643ef86fa94">&#9670;&nbsp;</a></span>GetLeft()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t TDraggable::GetLeft </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>拖动范围的左边限制。缺省为父控件的左边。 </p>

</div>
</div>
<a id="a2cb572cb5e104111293a5b8c6262f14b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2cb572cb5e104111293a5b8c6262f14b">&#9670;&nbsp;</a></span>GetRight()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t TDraggable::GetRight </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>拖动范围的右边限制。缺省为父控件的右边边。 </p>

</div>
</div>
<a id="a3687c79a0617ac922f873da75edf2900"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3687c79a0617ac922f873da75edf2900">&#9670;&nbsp;</a></span>GetTop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t TDraggable::GetTop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>拖动范围的顶部限制。缺省为父控件的顶部。 </p>

</div>
</div>
<a id="ac9fa35f827f0581f520cc67108f3644a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9fa35f827f0581f520cc67108f3644a">&#9670;&nbsp;</a></span>GetVerticalOnly()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TDraggable::GetVerticalOnly </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>只允许垂直拖动。 </p>

</div>
</div>
<a id="aea839570d8aa35928e3d21ee10f9432b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea839570d8aa35928e3d21ee10f9432b">&#9670;&nbsp;</a></span>SetBottom()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TDraggable::SetBottom </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>bottom</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置bottom。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">bottom</td><td>拖动范围的底部限制。缺省为父控件的底部。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ab305e1cf8174ca91d36d25d4ab9840e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab305e1cf8174ca91d36d25d4ab9840e1">&#9670;&nbsp;</a></span>SetDragWindow()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TDraggable::SetDragWindow </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>drag_window</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置drag_window。 拖动窗口而不是父控件。比如放在对话框的titlebar上，拖动titlebar其实是希望拖动对话框。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">drag_window</td><td>drag_window</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a9e2919804a3499fc60ac2c1481afbb2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e2919804a3499fc60ac2c1481afbb2d">&#9670;&nbsp;</a></span>SetHorizontalOnly()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TDraggable::SetHorizontalOnly </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>horizontal_only</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置horizontal_only。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">horizontal_only</td><td>只允许水平拖动。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a89091401784ec29b1dd9c9483d4afa0b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89091401784ec29b1dd9c9483d4afa0b">&#9670;&nbsp;</a></span>SetLeft()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TDraggable::SetLeft </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>left</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置left。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">left</td><td>拖动范围的左边限制。缺省为父控件的左边。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a2801c5c32eda58ed7d6ec0742df5f51c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2801c5c32eda58ed7d6ec0742df5f51c">&#9670;&nbsp;</a></span>SetRight()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TDraggable::SetRight </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>right</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置right。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">right</td><td>拖动范围的右边限制。缺省为父控件的右边边。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a4eb3acb66e132861a55ce97dc8cd9167"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4eb3acb66e132861a55ce97dc8cd9167">&#9670;&nbsp;</a></span>SetTop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TDraggable::SetTop </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>top</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置top。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">top</td><td>拖动范围的顶部限制。缺省为父控件的顶部。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aa102cfcddc3fd7293ab0686cd66f7f08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa102cfcddc3fd7293ab0686cd66f7f08">&#9670;&nbsp;</a></span>SetVerticalOnly()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TDraggable::SetVerticalOnly </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>vertical_only</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置vertical_only。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">vertical_only</td><td>只允许垂直拖动。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
